<template>
  <div>
    <el-container class="system-container">
      <el-header>
        <div class="logo clearfix">
          <h3 class="fl">惠泽保险后台管理系统</h3>
          <i class="el-icon-s-platform"></i>
          <i class="el-icon-s-opportunity"></i>
          <i class="el-icon-office-building"></i>
        </div>
      </el-header>
      <el-container>
        <el-aside
          width="200px"
          class="system-aside"
        >
          <h4>
            欢迎管理员
            <strong class="ostrong">{{ userName }}</strong>
          </h4>
          <el-menu
            default-active="1"
            class="el-menu-vertical-demo"
            :router="true"
          >
            <el-submenu index="1">
              <template slot="title">
                <i class="el-icon-user"></i>
                <span class="spanColor">管理员管理</span>
              </template>
              <el-menu-item-group>
                <el-menu-item index="/admin/adminsList">查看管理员列表</el-menu-item>
                <el-menu-item index="/admin/addAdmin">新增管理员</el-menu-item>
              </el-menu-item-group>
            </el-submenu>
            <el-submenu index="2">
              <template slot="title">
                <i class="el-icon-user-solid"></i>
                <span class="spanColor">销售员管理</span>
              </template>
              <el-menu-item-group>
                <el-menu-item index="/admin/salesmansList">查看所有销售员</el-menu-item>
                <el-menu-item index="/admin/addSalesman">新增销售员</el-menu-item>
              </el-menu-item-group>
            </el-submenu>
            <el-submenu index="3">
              <template slot="title">
                <i class="el-icon-s-management"></i>
                <span class="spanColor">保险产品管理</span>
              </template>
              <el-menu-item-group>
                <el-menu-item index="/admin/productList">查看所有保险产品</el-menu-item>
                <el-menu-item index="/admin/addproduct">新增保险产品</el-menu-item>
              </el-menu-item-group>
            </el-submenu>
            <el-submenu index="4">
              <template slot="title">
                <i class="el-icon-menu"></i>
                <span class="spanColor">保险分类管理</span>
              </template>
              <el-menu-item-group>
                <el-menu-item index="/admin/classifyList">查看所有保险分类</el-menu-item>
                <el-menu-item index="/admin/addClassify">新增保险分类</el-menu-item>
              </el-menu-item-group>
            </el-submenu>
            <el-submenu index="5">
              <template slot="title">
                <i class="el-icon-s-order"></i>
                <span class="spanColor">保险订单管理</span>
              </template>
              <el-menu-item-group>
                <el-menu-item index="/admin/orderList">查看所有订单信息</el-menu-item>
                <el-menu-item index="/admin/orderRefoundList">查看所有退保订单</el-menu-item>
              </el-menu-item-group>
            </el-submenu>
            <el-submenu index="6">
              <template slot="title">
                <i class="el-icon-s-custom"></i>
                <span class="spanColor">客户管理</span>
              </template>
              <el-menu-item-group>
                <el-menu-item index="/admin/usersList">查看所有客户</el-menu-item>
              </el-menu-item-group>
            </el-submenu>
            <el-submenu index="7">
              <template slot="title">
                <i class="el-icon-s-help"></i>
                <span class="spanColor">理赔管理</span>
              </template>
              <el-menu-item-group>
                <el-menu-item index="/admin/claimsList">查看所有理赔</el-menu-item>
              </el-menu-item-group>
            </el-submenu>
          </el-menu>
        </el-aside>
        <el-main>
          <router-view></router-view>
        </el-main>
      </el-container>
    </el-container>
  </div>
</template>

<script>
export default {
  data() {
    return {
      userName: "",
    };
  },
  created() {
    this.userName = localStorage.getItem("userName");
  },
  methods: {},
};
</script>

<style scoped lang="scss">
@import url("./system.css");
</style>
